const TOKEN = 'jk-token';

export const getToken = () => {
  return localStorage.getItem(TOKEN);
};

export const setToken = (token) => {
  return localStorage.setItem(TOKEN, token);
};

export const removeToken = () => {
  return localStorage.removeItem(TOKEN);
};

export const hasToken = () => {
  //    强制转换为布尔值
  return !!getToken();
};
